package com.hystrix.api.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.text.SimpleDateFormat;
import java.util.Date;

@RestController
public class MemberApiController {

    /*此接口将会被订单服务调用*/
    @RequestMapping("/getMember")
    public String getMember(){
        try {
            Thread.sleep(1500);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd HH:mm:ss");
        Date date = new Date();
        return "你好，这里是会员服务！"+sdf.format(date);
    }
}
